Skip to content

Feat: add submit api stale alert and dashboard pannel - #68

Merged
tripura-repalle merged 2 commits into
mainfrom
feat/submit-api-stale-alert
Aug 25, 2026
Merged

Feat: add submit api stale alert and dashboard pannel#68
tripura-repalle merged 2 commits into
mainfrom
feat/submit-api-stale-alert

Conversation

@tripura-repalle

@tripura-repalle tripura-repalle commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Closes: #67

Summary

Adds staleness monitoring for the Submit API (alert + dashboard panel) and fixes a bug that prevented any Demeter alert rules from being provisioned.

Submit API staleness

The Submit API is a stateless HTTP proxy that forwards transaction submissions to a cardano-node; it exposes no chain tip of its own. If the node it forwards to has a frozen chain tip, submissions are relayed against a stale tip with no visibility today. This PR detects that condition via the backing node's block-height progress.

  • Alertgrafana/alerts/demeter/submit-api.json
    • Group Submit API, folder Demeter, rule "Submit API backing node is stale", for: 10m, receiver #infra-alerts.
    • Condition: changes(cardano_node_metrics_blockNum_int{namespace="ext-nodes-m1", pod=~"node-.*"}[15m]) < 1 — fires when the backing node is up but its block height has not advanced for at least 15 minutes.
  • Dashboard — new panel "Node Block Advancement (changes / 15m)" (id 20) added to the SubmitAPI dashboard (grafana/dashboards/shared/submit-api.json), red@0 / green@1, filtered by $network.

This is complementary to the existing node.json alert: that one detects a node whose series disappears, whereas this detects a node that is up but frozen.

Fix: alert folder was never created

Instantiating the grafana_alerts module surfaced a pre-existing bug: the module only created its folder when the configured folder_uid was empty, but config.yaml always supplies a concrete UID (e.g. de9p56uby56v4a for Demeter). As a result the folder was never created, and every rule group failed on apply with:

[PUT /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}][400] invalid alert rule: folder does not exist

The module now always manages its folder with the config.yaml title/uid (mirroring the grafana_dashboard module), guarded by a count so a missing/empty alert directory (e.g. grafana/alerts/blinklabs) stays a no-op and never creates a stray folder. Rule groups reference the managed folder's uid, and the now-unused folders variable is removed.

Validation

terraform fmt clean and terraform validate passes. A plan on this branch is clean:

Plan: 8 to add, 1 to change, 0 to destroy.
  • adds the Demeter alert folder + all rule groups (cluster, fabric, kupo, kupo-dolos, node, submit-api)
  • updates the SubmitAPI dashboard in-place (the new panel)
  • Blink Labs alerts remain a no-op (empty directory)

…panel

Mirrors the Ogmios tip-stale pattern for the Submit API. The Submit API is a stateless proxy with no chain tip of its own, so staleness is detected via the backing cardano-node it forwards to: changes(cardano_node_metrics_blockNum_int) over 15m. When the node's block height stops advancing while the node is up, the Submit API is relaying transactions against a frozen tip.

Adds grafana/alerts/demeter/submit-api.json (group "Submit API", folder "Demeter", rule "Submit API backing node is stale", for 10m, receiver #infra-alerts) and a "Node Block Advancement (changes / 15m)" timeseries panel (id 20) to the SubmitAPI dashboard.

Signed-off-by: Tripura Repalle <tripura@blinklabs.io>
The grafana_alerts module only created a folder when the configured folder_uid was empty, but config.yaml always supplies a concrete UID (e.g. de9p56uby56v4a for Demeter). As a result the folder was never created, and terraform apply failed for every rule group with '[PUT .../rule-groups/...][400] invalid alert rule: folder does not exist'.

Now the module always manages its folder with the config.yaml title/uid (mirroring the grafana_dashboard module), guarded by a count so a missing/empty alert directory (e.g. grafana/alerts/blinklabs) stays a no-op and never creates a stray folder. Rule groups reference the managed folder's uid. Removes the now-unused folders variable.

Signed-off-by: Tripura Repalle <tripura@blinklabs.io>
@tripura-repalle
tripura-repalle merged commit 537c47c into main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add submit-api tip-stale alert and dashboard panel

2 participants